import { getBannerlist } from '../../../require/api'

const state = {
    bannerList: []
}
const getters = {
    getBanner(state) {
        return state.bannerList
    }
}
const mutations = {
    GETBANNER(state, payload) {
        state.bannerList = payload
    }
}
const actions = {
    bannerAction({ commit }) {
        getBannerlist().then(res => {
            if (res.code == 200) {
                commit('GETBANNER', res.list)
            }

        })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true

}